import { createSlice } from '@reduxjs/toolkit';
export const imageModalSlice = createSlice({
  name: 'imageModal',
  initialState: {
    showImageModal: false,
    url: '',
  },
  reducers: {
    show: (state) => {
      state.showImageModal = true;
    },
    hide: (state) => {
      state.showImageModal = false;
    },
    setUrl: (state, payload) => {
      console.log(payload);
      state.url = payload.url;
    },
  },
});
